<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>angular forEach遍历</title>
    <script src="../angular.js"></script>
</head>
<body>
<div ng-app="gg" ng-controller="ctrl">
    {{data}}
</div>

<script>
    var mod = angular.module('gg', []);
    mod.controller('ctrl', ['$scope', function ($scope) {
        var obj = {'name' :　'果果'};
        angular.extend(obj , {url : 'www.gg.com', 'web' : 'gg个人网站'});
//        console.log(obj);

        //angular工具库
        $scope.data = [
            {name : 'gg', url : 'www.gg.com'},
            {name : 'qc', url : 'www.qc.com'},
            {name : 'xxx', url : 'www.xxx.com'},
            ];
        //遍历
        angular.forEach($scope.data, function (v, k) {
//            console.log(v);
            v.url = v.url+'.cn';
        });
    }])
    
</script>
</body>
</html>